
#ifndef _WidgetsManager_H_
#define _WidgetsManager_H_

#include "../OLCore/AbstractManager.hpp"
#include "../OLCore/AbstractObject.hpp"
#include "../OLApp/Application.hpp"

#include <PythonQt.h>

namespace NSApplication {

	class APPLICATIONAPI WidgetsManager :
		public NSCore::AbstractManager
	{
		Q_OBJECT

	public:
		WidgetsManager();
		~WidgetsManager();
	public:
		inline QString className() override { return "WidgetsManager"; };
		template<typename T>
		T* getWidget(QString name) {
			T* ins = dynamic_cast<T*>(getObject(name));
			return ins;
		}
		template<typename T>
		void addWidget(T* widget) {
			registerObject(widget);
		}

	};

}

#endif
